/*
 * Lenovo Group
 * Copyright (c) 2015-2016 All Rights Reserved.
 * 
 * Project Name:assign-tracer
 * Create Time: 2016年2月1日 下午4:21:52
 */
package com.lenovo.lmrp.server.assigntracer.util.pusher;

import java.util.Objects;

import com.lenovo.lmrp.api.model.entity.EngineerPO;
import com.lenovo.lmrp.api.model.view.EngineerVO;

/**
 * @author songyz
 *
 */
public class TransformUtil {
    public static EngineerVO tranEngineerPO2VO(EngineerPO engineerPO) {
        EngineerVO engineerVO = new EngineerVO();
        if (engineerPO != null) {
            engineerVO.setEmail(engineerPO.getEmail());
            engineerVO.setEngineerid(engineerPO.getId());
            engineerVO.setLoginname(engineerPO.getLoginName());
            engineerVO.setName(engineerPO.getFullName());
            engineerVO.setPhone(engineerPO.getPhone());
            if (Objects.nonNull(engineerPO.getStatus())) 
            	engineerVO.setStatus(engineerPO.getStatus().ordinal());
			
        }
        return engineerVO;
    }
}
